package com.kevin.v2.aspect;

import com.kevin.v2.spring.formework.aop.aspect.KvJoinPoint;
import lombok.extern.slf4j.Slf4j;

import java.util.Arrays;

@Slf4j
public class LogAspect {


   public void before (KvJoinPoint point) {
      log.debug("Method:" + point.getMethod().toString());
      log.debug("Args:" + Arrays.toString(point.getArgs()));
      log.debug("Class:" + point.getThis().toString());

   }

   public void after (KvJoinPoint point) {
      log.debug("Method:" + point.getMethod().toString());
      log.debug("Args:" + Arrays.toString(point.getArgs()));
      log.debug("Class:" + point.getThis().toString());
   }

   public void afterThrowing (KvJoinPoint point)throws Exception {
      log.debug("Method:" + point.getMethod().toString());
      log.debug("Args:" + Arrays.toString(point.getArgs()));
      log.debug("Class:" + point.getThis().toString());
   }


}
